package com.zjitc.dao;

import com.zjitc.model.Order;
import com.zjitc.model.OrderItem;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigInteger;
import java.util.List;

/**
 * Create by IntelliJ IDEA
 *
 * @author: MaoYongQi
 * @date-Time: 2018/3/29 9:19
 * @description:
 */
public interface OrderDao {

  /**
   * find   order  by   shippingId
   * @param shippingId
   * @return
   */
  Order findOrderByShippingId(@Param("shipping_id") String shippingId);

  /**
   * find  OrderItem  By  OrderNo
   * @param orderNO
   * @return
   */
  List<OrderItem> findOrderItemByOrderNo(BigInteger orderNO);

  /**
   * add   order
   * @param order
   */
  void addOrder(Order order);

  /**
   *  add  orderitem
   * @param orderItemVoList
   */
  void addOrderItem(List<OrderItem> orderItemVoList);

  /**
   * select All Order count
   * @return
   */
  int findAllCount();

}
